{php include wl_template('common/header');}
<style>
	.user-block .avatar{
		width: 50px;
		height: 50px;
		float: left;
		margin-left: 25%;
	}
	.user-block .avatar img{
		width: 100%;
		height: 100%;
		border-radius: 50%;
	}
	.user-block .nickname{
		margin-left: 5px;
		height: 50px;
		line-height: 20px;
		float: left;
	}
	.user-block .nickname label{
		font-size: 12px;
		padding: 1px 5px;
	}
	textarea{
		width: 100%;
		min-height: 50px;
		font-size: 12px;
		resize: none;
		text-indent: 2em;
		cursor: pointer;
		line-height: 15px;
	}
</style>
<ul class="nav nav-tabs">
	<li class="active"><a href="#">通信管理</a></li>
</ul>
<div class="app-content">
	<!--顶部信息内容-->
	<div class="app-filter">
		<div class="filter-list">
			<form action="" method="get" class="form-horizontal" role="form" id="form1">
	            <input type="hidden" name="c" value="site" />
	            <input type="hidden" name="a" value="entry" />
	            <input type="hidden" name="m" value="{MODULE_NAME}" />
	            <input type="hidden" name="p" value="member" />
				<input type="hidden" name="ac" value="userIm" />
				<input type="hidden" name="do" value="index" />
				<input type="hidden" name="send_type" value="{$sendType}" />
				<input type="hidden" name="receive_type" value="{$receiveType}" />
				<div class="form-group">
					<label class="col-sm-2 control-label">发送方类型</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('send_type:1');}" class="btn {if $sendType == 1}btn-primary{else}btn-default{/if}">用户</a>
							<a href="{php echo wl_filter_url('send_type:2');}" class="btn {if $sendType == 2}btn-primary{else}btn-default{/if}">商户</a>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">接收人类型</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('receive_type:1');}" class="btn {if $receiveType == 1}btn-primary{else}btn-default{/if}">用户</a>
							<a href="{php echo wl_filter_url('receive_type:2');}" class="btn {if $receiveType == 2}btn-primary{else}btn-default{/if}">商户</a>
						</div>
					</div>
				</div>
				<div class="form-group form-inline">
					<label class="col-sm-2 control-label">筛选</label>
					<div class="col-sm-9">
						<select name="search_type" class="form-control">
							<option value="1" {if $searchType == 1}selected{/if}>发送方昵称</option>
							<option value="2" {if $searchType == 2}selected{/if}>接收方昵称</option>
							<option value="3" {if $searchType == 3}selected{/if}>通信内容</option>
						</select>
						<input type="text" name="search" class="form-control" value="{$search}"  placeholder="请输入关键字"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-9">
						<button class="btn btn-primary" type="submit">筛选</button>
					</div>
				</div>
	        </form>
		</div>
	</div>
	<!--列表信息-->
	<div class="app-table-list">
		<div class="table-responsive">
			<table class="table table-responsive">
                <thead>
                    <tr>
                        <th width="20%" class="text-center">发送方</th>
						<th width="20%" class="text-center">接收方</th>
                        <th width="40%" class="text-center">最新消息</th>
                        <th width="20%" class="text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $list $vo}
						<tr class="text-center">
							<td class="user-block">
								<div class="avatar">
									<img src="{$vo['send_logo']}" />
								</div>
								<div class="nickname text-left">
									<div>{$vo['send_user']}</div>
									<label class="label label-warning label-sm">{$vo['send_type_text']}</label>
								</div>
							</td>
							<td class="user-block">
								<div class="avatar">
									<img src="{$vo['receive_logo']}" />
								</div>
								<div class="nickname text-left">
									<div>{$vo['receive_user']}</div>
									<label class="label label-warning label-sm">{$vo['receive_type_text']}</label>
								</div>
							</td>
							<td class="text-left">
								<textarea disabled="disabled">{$vo['new_send_user']}：{$vo['content']}</textarea>
							</td>
							<td>
								<a class="btn btn-warning btn-sm" data-toggle="ajaxModal" href="{php echo web_url('member/userIm/record',['id' => $vo['id']]);}">通信记录</a>
								<a class="btn btn-info btn-sm" data-toggle='ajaxRemove' href="{php echo web_url('member/userIm/clearRecord',['id' => $vo['id']]);}"
								   data-confirm="确定要清空【{$vo['send_user']}】与【{$vo['receive_user']}】的所有通信记录吗？">清空</a>
								<a class="btn btn-danger btn-sm" data-toggle='ajaxRemove' href="{php echo web_url('member/userIm/deleteOneInfo',['id' => $vo['id']]);}"
								   data-confirm="确定要删除当前信息吗？">删除</a>
							</td>
						</tr>
                    {/loop}
                </tbody>
            </table>
		</div>
		<div class="app-table-foot clearfix">
			<div class="pull-left"></div>
			<div class="pull-right">{$pager}</div>
		</div>
	</div>
</div>
{php include wl_template('common/footer');}
